Fix static shape propagation in aten.as_strided#4334
Fix static shape propagation in aten.as_strided#4334raayandhar wants to merge 3 commits intollvm:mainfrom
aten.as_strided#4334Conversation
zjgarvey
left a comment
There was a problem hiding this comment.
Thanks for the fix. I'd remove the unrelated tests (unflatten isn't actually related to the code change). Let me know when you'd like me to take another look and we can get it merged.
Thanks for the feedback - I think it should be good for a look now. |
6ebadc1 to
95d4bbf
Compare
95d4bbf to
d4469ea
Compare
|
@zjgarvey now that we landed the fixes so that we don't get |
|
@raayandhar we should really emit a fatal error on seeing this op. There is no way we can support this. |
Sounds good, closing |
Intermediate view operations were not properly propagating static shapes. Thanks to Zach for pointing out how to fix this issue, see #4325 for more discussion. They key change is
viewShapeInts[dim] = sizeto preserve the static shape.I have kept the e2e Python tests for
aten.unflattenand the MLIR tests for the TorchToLinalg conversion ofunflattenas well, I think they may be useful for some more coverage that wasn't there before, but open to suggestions on whether or not to keep these.